package year2019.month12;

import java.util.Arrays;

public enum Day {

    MONDAY, TUESDAY, WEDNESDAY,
    THURSDAY, FRIDAY, SATURDAY, SUNDAY;

    public static void main(String[] args){
        //直接引用
        Day day =Day.MONDAY;

        System.out.println(day);
        System.out.println(day.name());
        System.out.println(day.ordinal());
        System.out.println(Day.valueOf("TUESDAY"));

        Arrays.asList(Day.values()).forEach(System.out::println);

        /*Day[] days = Day.values();
        for (int i=0; i<days.length; i++){
            System.out.println(days[i]);
        }*/

    }

}

